<html xmlns:th="https://www.thymeleaf.org">
<head >
    <title>Please Login</title>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Majestic Admin</title>

    <link rel="stylesheet" th:href="@{/css/login/materialdesignicons.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/login/vendor.bundle.base.css}"/>
    <link rel="stylesheet" th:href="@{/css/login/style.css}"/>
    <link rel="shortcut icon"  th:href="@{/images/lxm.jpg}"/>
</head>
<body >
    <div class="container-scroller" th:fragment="content">
        <div class="container-fluid page-body-wrapper full-page-wrapper">
            <div class="content-wrapper d-flex align-items-center auth px-0">
                <div class="row w-100 mx-0">
                    <div class="col-lg-4 mx-auto">
                        <div class="auth-form-light text-left py-5 px-4 px-sm-5">
                            <div class="brand-logo ">
                                <img th:src="@{/images/dancing.jpg}" alt="logo">
                            </div>
                            <h4>Hello! let's get started</h4>
                            <h6 class="font-weight-light">Sign in to continue.</h6>
                            <form class="pt-3" name="f" th:action="@{/login}" method="post" >
                                    <div class="form-group">
                                    <input type="text" id="username" name="username" class="form-control form-control-lg" placeholder="Username" >
                                </div>
                                <div class="form-group">
                                    <input type="password" id="password" name="password" class="form-control form-control-lg"  placeholder="Password">
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control form-control-lg" id="Captcha" placeholder="Captcha" name="code">
                                </div>
                                <div class="form-group">
                                    <div class="x">
                                        <img id="num" th:src="@{/code}" />
                                        <a href="javascript:;" onclick="document.getElementById('num').src = '/code?'+(new Date()).getTime()">换一张</a>
                                    </div>
                                </div>
                                <div class="mt-3">
                                    <button class="btn btn-block btn-primary btn-lg font-weight-medium auth-form-btn" type="submit" >SIGN IN</button>

                                </div>
                                <div th:if="${param.error}" class="alert alert-error" style=" color: crimson">
                                    <p th:if="${session.SPRING_SECURITY_LAST_EXCEPTION}">
                                    <p th:text="${session.SPRING_SECURITY_LAST_EXCEPTION.message}"></p>
                                    </p>

                                </div>


                                <!--<div th:if="${param.logout" class="alert alert-success">-->
                                    <!--You have been logged out.-->
                                <!--</div>-->
                                <div class="my-2 d-flex justify-content-between align-items-center">
                                    <div class="form-check">
                                        <label class="form-check-label text-muted">
                                            <input type="checkbox" class="form-check-input">
                                            Keep me signed in
                                        </label>
                                    </div>
                                    <a href="#" class="auth-link text-black">Forgot password?</a>
                                </div>
                                <!--   <div class="mb-2">
                                       <button type="button" class="btn btn-block btn-facebook auth-form-btn">
                                           <i class="mdi mdi-facebook mr-2"></i>Connect using facebook
                                       </button>
                                   </div>-->
                                <div class="text-center mt-4 font-weight-light">
                                    Don't have an account? <a th:href="@{/toregister}" class="text-primary">Create</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <!-- content-wrapper ends -->
        </div>
        <!-- page-body-wrapper ends -->
    </div>


</body>
</html>